<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_usuario_transacao" name="form_usuario_transacao" action="<?php echo url_for('usuario_transacao/save'); ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="id_usuario_transacao" value="<?php echo $form->getObject()->getIdUsuarioTransacao() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
  <table class="form">
    <tbody>
      <tr><th colspan="2" class="title"></th></tr>
      <?php echo $form->renderGlobalErrors() ?>

      <?php if($id_dados_usuario != ""):?>
      	<?php echo input_hidden_tag('usuario_transacao[id_dados_usuario]', $id_dados_usuario); ?>
      <?php else:?>
	      <tr>
	        <th><?php echo $form['id_dados_usuario']->renderLabel() ?></th>
	        <td>
	          <?php echo $form['id_dados_usuario'] ?>
	          <?php echo form_error('id_dados_usuario'); ?>
	        </td>
	      </tr>
      <?php endif;?>

      <tr>
        <th><?php echo $form['ds_produto']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_produto'] ?>
          <?php echo form_error('ds_produto'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_hora_transacao']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_hora_transacao'] ?>
          <?php echo form_error('nu_hora_transacao'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_autorizacao']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_autorizacao'] ?>
          <?php echo form_error('nu_autorizacao'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_cv']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_cv'] ?>
          <?php echo form_error('nu_cv'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_valor_bruto']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_valor_bruto'] ?>
          <?php echo form_error('nu_valor_bruto'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_total_parcelas']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_total_parcelas'] ?>
          <?php echo form_error('nu_total_parcelas'); ?>
        </td>
      </tr>
    </tbody>
  </table>

          <br />
		<input type="submit" value="Salvar" id="submit" class="btn">

          <br />
          <br />
</form>

<script>
    $(function()
        {
            System.formdata.save(new Array("msgAlerta", "Atenção:"));
            $("#usuario_transacao_nu_hora_transacao").mask("99:99");
        }
    );
</script>